from a0base.base_llm import zhipu_openai_llm

# 1-定义对话上下文
messages = [
    {"role": "system", "content": "You are a helpful assistant! Your name is Bob."},
    {"role": "user", "content": "你是谁？"},
]

# 2-打印
# 与LLM对话
response = zhipu_openai_llm.chat.completions.create(
    model="glm-4",  # 或者其他可用的模型，如glm-3-turbo
    messages=messages,
    temperature=0.7,
    max_tokens=1000
)

# 打印回复
print("-----Hold on, LLM 正在回答！-----")
print("AI回复：", response.choices[0].message.content)
